<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

class LeavingMessage extends Model
{
	use HasDateTimeFormatter;
    use SoftDeletes;

    protected $table = 'leaving_message';
    protected $fillable = ['user_openid','prize_user_id','name','tel','address','status','remarks','created_at','updated_at','deleted_at'] ;

    public function user()
    {
        return $this->belongsTo(RcUser::class,'user_openid','open_id');
    }

    public function prize()
    {
        return $this->belongsTo(PrizeUser::class,'prize_user_id','id');
    }
    
}
